<template>
	<view class="wrap">
	   <view class="bg-color-white" style="border-radius: 5px; padding: 5px 0 5px 14px;">
		   <vtabs  v-model="current" :scroll="false" :tabs="list" @change="change"> </vtabs>
		   
		   <view class="row-center" v-if="current == 2">
		   	<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F9b72bd36b23337efc27d1974f55ad1cd.png" ></image>
		   	<view class="row-center bb-line">
		   		<view class="bb-title">用车天数</view>
				<picker @change="confirmDays" :value="index" range-key="label"	 :range="daysList">
					<input @click="dayShow=true" v-model="days_short" disabled placeholder="请选择用车天数"/>
				</picker>
		   	</view>
		   </view>
			<view class="row-center">
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F8f5db7aa7e25c1d2fb5db46c876ee99b.png"></image>
				<view class="row-center bb-line">
					<view class="bb-title">出发</view>
					<view @click="goselAdd(1)" style="flex: 1;" hover-class="navigator-hover">
						<view class="display-flex display-flex-align-center address-input" style="height:44px">
							<view v-if="form.origin" class="single-line-ellipsis search-input-text-nocontent" style="font-size:26upx;color: #121212;">{{form.origin}}</view>
							<view v-else class=" search-input-text-nocontent" style="font-size:26upx">您要从哪儿出发</view>
						</view>
					</view>
				</view>
			</view>
			<view class="row-center">
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F8110aa80c18bf96356b36ab325f4d794.png"></image>
				<view class="row-center bb-line">
					<view class="bb-title">到达</view>
					<view @click="goselAdd(2)" style="flex: 1;" hover-class="navigator-hover">
						<view class="display-flex display-flex-align-center address-input" style="height:44px;">
							<view v-if="form.destination" class="single-line-ellipsis search-input-text-nocontent" style="font-size:26upx;color: #121212">{{form.destination}}</view>
							<view v-else class=" search-input-text-nocontent" style="font-size:26upx;">您要到哪儿去</view>
						</view>
					</view>
				</view>
			</view>
			<view class="row-center">
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F9b72bd36b23337efc27d1974f55ad1cd.png" ></image>
				<view class="row-center bb-line">
					<view class="bb-title">去程时间</view>
					<!-- <xPicker  @confirm="goConfirm" mode="mdhi" :isFu="true">
						<input  v-model="go_time_short" disabled placeholder="请选择您的出发时间"/>
					</xPicker> -->
					
					<view class=""  @click="goOpen">
						<input  v-model="go_time_short" disabled placeholder="请选择您的出发时间"/>
					</view>	
				</view>
			</view>
			<view class="row-center" v-if="current==1" >
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F399aa1d21287f77a24937fb408696bd7.png" ></image>
				<view class="row-center bb-line">
					<view class="bb-title">返程时间</view>
					<!-- <xPicker  @confirm="backConfirm" mode="mdhi" :isFu="true">
						<input  v-model="back_time_short" disabled placeholder="请选择您的返程时间"/>
					</xPicker> -->
					<view class=""  @click="backOpen" >
						<input  v-model="back_time_short" disabled placeholder="请选择您的返程时间"/>
					</view>
				</view>
			</view>
			<view class="row-center">
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F6ce27d1e1ae6a5a8998d52bbf281705b.png" ></image>
				<view class="row-center bb-line">
					<view class="bb-title">用车人数</view>
					<input  v-model="form.peopleSum" @blur="elPeopleSum"  type="number" placeholder="请输入用车人数"/>
				</view>
			</view>
			<view class="row-center" >
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2Faafada86d1484e6c79aa744fdf2a5d9e.png" ></image>
				<view class="row-center bb-line"  @click="showCarType">
					<view class="bb-title">选择车辆</view>
					<input v-model="form.carType" disabled placeholder="请选择车辆类型"/>
				</view>
			</view>
			
			<view class="row-center">
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F9b82e242804d471fc78fdf8484b33e34.png"></image>
				<view class="row-center bb-line">
					<view class="bb-title">联系人</view>
					<input  v-model="form.name"   placeholder="请填写联系人姓名"/>
				</view>
			</view>	
			<view class="row-center">
				<image class="icon-44" style="margin-right: 3px;" src="https://qiniu.gybsky.cn/other%2F767b9974f6a4ff4173f8ceaf8e5a7b04.png" ></image>
				<view class="row-center bb-line">
					<view class="bb-title">联系电话</view>
					<input  v-model="form.phone"  maxlength="11" placeholder="请填写联系人手机号"/>
				</view>
			</view>
			
			<view @click="submitTrip" class="bule-button3" style="margin-top: 18px;">
				提交
			</view>
			
			<view class="row-center whiteBg" style="background-color: #fff; position:fixed;z-index:0;bottom:0;left:0;right:0;padding:8px 12px;justify-content:space-around; box-shadow: 0px -1px 4px rgba(0, 0, 0, 0.1);padding-bottom:8px">
				<view @click="contactUs" class="column" style="align-items:center;justify-content:center;">
				    <image class="icon-44" src="https://qiniu.gybsky.cn/other%2F18d938502feaf2c1c8a60dc5239de07a.png"></image>
				    <text >客服</text>
				</view>
				<view @click="gotoOrderList" class="column" style="align-items:center;justify-content:center;">
					<image class="icon-44" src="https://qiniu.gybsky.cn/other%2F5f87a85912a21241e9555074e2e3b02a.png"></image>
					<text >订单</text>
				</view>
				<view @click="gotoXuzhi" class="column" style="align-items:center;justify-content:center;">
					<image class="icon-44" src="https://qiniu.gybsky.cn/other%2Fd3a85db46d4ed869b9afdc69859d8033.png"></image>
					<text >包车须知</text>
				</view>
				    
			</view>
	   </view>
	   <uv-popup ref="popup" :close-on-click-overlay="true" mode="bottom" round="10">
			<view class="row-center" style="padding: 15px;justify-content: space-between;
			margin-top: 10px;">
				<!-- <view  class=""  @click="carTypeShow = false"  style="color: #bdbdbd;">
					取消
				</view> -->
				<!-- <view class="" style="color: #121212;font-size: 15px;font-weight: 700;">
					选择车辆
				</view> -->
				<!-- <view  @click="carTypeShow = false" class="" style="color: #007AFF;">
					确定
				</view> -->
				<view class="row-center">
					<view class="" style="font-weight: 700;font-size: 18px;">
						请选择车辆
					</view>
					<view class="row-center" style="margin-left: 10px;">
						<image src="../../../static/images/bus/dunpai.png" style="width: 20px;height: 20px;" ></image>
						<view style="color: #4ec6a9;font-size: 13px">
							车辆已消毒，安心有保障
						</view>
					</view>
				</view>
				<view class="iconfont icon-guanbi"  @click="closeCarType" >
					
				</view>
			</view>
			<view class="content" style="height:100%;">
				<scroll-view scroll-y="true" v-if="carTypeList.length" style="min-height: 200px;">
					<view style="padding-bottom: 20px;">
						<view style="margin: 10px;" class="row-center" v-for="(item,index) in carTypeList" :key="index">
							<view class="">
								{{item.name}}( {{item.seat}}人)
							</view>
							<view  style="margin-left: auto;">
								<wNumber  :value="item.num" color="#007AFF" :params="index" @change="valchange" :min="0" :max="100"></wNumber>
							</view>
						</view>
					</view>
				</scroll-view>
				<view class="sub-btn" @click="confirmCarType" >
					确定选择
				</view>
			</view>
		</uv-popup>
		<!-- <u-select v-model="dayShow" mode="single-column" :list="daysList" @confirm="confirmDays"></u-select> -->
	<!-- 	<apopup  mode="bottom" :show="carTypeShow" :safe-area-inset-bottom="true"  height="600" :border-radius="20" @close="closeCarType">
			
		</apopup> -->
		<uv-datetime-picker ref="gotimePicker"
		 v-model="goValue"
		  mode="datetime" 
		 @confirm="goConfirm"
		 :filter="filter" 
		 :formatter="formatter" 
		 :minDate="minDate" 
		 :maxDate="1786778555000" 
		 >
		</uv-datetime-picker>	
		<uv-datetime-picker ref="backtimePicker"
		 v-model="backValue"
		  mode="datetime" 
		 @confirm="backConfirm"
		 :filter="filter" 
		 :formatter="formatter2" 
		 :minDate="minDate" 
		 :maxDate="1786778555000" 
		 >
		</uv-datetime-picker>	
		
		<view class="privacy-wrapper" v-if="privacyStatus">
			<view class="privacy-box">
				<view class="title">包车规则及退单规则</view>
				<view class="content">
					请务必审慎阅读、充分理解“包车规则及退单规则”各条款，包括但不限于：为了 向你提供即时通讯、内容分享等服务，我 们需要收集你的设备信息、操作日志等个
					人信息。你可以在“设置”中查看、变更、 删除个人信息并管理你的授权。注：车辆不可到达的包车线路将全额退款。
					<br />
					你可以阅读
					<view  @click="gotoXuzhi">《包车规则及退单规则》</view>
					了解 详细信息。如你同意，请点击“我同意”开始接受我们的服务。
				</view>
				<view class="btn-box">
					<view class="btn-item" @click="confirmApp">我同意</view>
					<view class="btn" @click="closeModel">随便逛逛</view>
				</view>
			</view>
		</view>
		
	</view>	
</template>

<script>
	 import Cache from '../../../utils/cache';
	import {
		openKf
	} from "@/utils";
	import {
			mapGetters
		} from "vuex";
	import {
		toLogin
	} from '@/libs/login.js';
	import  vtabs  from "@/components/vTabs/index.vue"
	import  xPicker  from "@/components/xPicker/index.vue"
	import  wNumber  from "@/components/wNumber/index.vue"
	
	import apopup from '@/components/a-popup/index'
	import { getBaocheList, saveBaoche } from "@/api/api.js"
   import uvDatetimePicker from '@/uni_modules/uv-datetime-picker/components/uv-datetime-picker/uv-datetime-picker.vue'
   import uvPopup from '@/uni_modules/uv-popup/components/uv-popup/uv-popup.vue'
   
	export default {
		computed: mapGetters(['isLogin']),
		components:{apopup,vtabs,xPicker,wNumber, uvDatetimePicker,uvPopup},
		data() {
			return {
				privacyStatus: false,
				isSeatSucces: false,
				seat: 0,
				minDate: (Number(new Date()) + 7200000),
				goValue: (Number(new Date()) + 7200000),
				backValue: (Number(new Date()) + 7200000),
				carTypeList: [
					{
					  "id": 1,
					  "name": "小型公交车",
					  "seat": "40",
					  "num" : 0
					},
					{
					  "id": 2,
					  "name": "大型公交车",
					 "seat": "70,",
					  "num" : 0
					}
					
				],
				carTypeShow: false,
				days_short: '',
				dayShow: false,
				daysList: [
					{
						value: 1,
						label: '1天'
					},
					{
						value: 2,
						label: '2天'
					},
					{
						value: 3,
						label: '3天'
					},
					{
						value: 4,
						label: '4天'
					},
					{
						value: 5,
						label: '5天'
					},
					{
						value: 6,
						label: '6天'
					},
					{
						value: 7,
						label: '7天'
					},
					{
						value: 8,
						label: '8天'
					},
					{
						value: 9,
						label: '9天'
					},
					{
						value: 10,
						label: '10天'
					},
					{
						value: 11,
						label: '11天'
					},
					{
						value: 12,
						label: '12天'
					},
					{
						value: 13,
						label: '13天'
					},
					{
						value: 14,
						label: '14天'
					},
					{
						value: 15,
						label: '15天'
					},
					{
						value: 16,
						label: '16天'
					},
					{
						value: 17,
						label: '17天'
					},
					{
						value: 18,
						label: '18天'
					},
					{
						value: 19,
						label: '19天'
					},
					{
						value: 20,
						label: '20天'
					},
					{
						value: 21,
						label: '21天'
					},
					{
						value: 22,
						label: '22天'
					},
					
					{
						value: 23,
						label: '23天'
					},
					{
						value: 24,
						label: '24天'
					},
					{
						value: 25,
						label: '25天'
					},
					{
						value: 26,
						label: '26天'
					},
					{
						value: 27,
						label: '27天'
					},
					{
						value: 28,
						label: '28天'
					},
					{
						value: 29,
						label: '29天'
					},
					{
						value: 30,
						label: '30天'
					},
				],
				goShow:false,
				backShow:false,
				params: {
					year: false,
					month: true,
					day: true,
					hour: true,
					minute: true,
					second: false
				},
				list: [ '单程','往返', '包天'],
				current: 0,
				go_time_short: '',
				back_time_short: '',
				car_type_str: '',
				carList: [],
				form: { 
					carStr: '',
					type:'',
					origin: '',
					destination: '',
					originLng: '',
					originLat: '',
					destinationLng: '',
					destinationLat: '',
					goTime: '',
					backTime: '',
					peopleSum: '',
					name: '',
					phone: '',
					days: '',
					carType:''
				},
				
			};
		},
		onShow() { 
			if(this.isLogin == true){
				 // this.getUserInfo()
			}else{ 
				toLogin();
			}
			
			this.form.origin = uni.getStorageSync("start_baoche")?uni.getStorageSync("start_baoche").name:"";
			this.form.destination = uni.getStorageSync("end_baoche")?uni.getStorageSync("end_baoche").name:"";
			this.form.originLng = uni.getStorageSync("start_baoche")?uni.getStorageSync("start_baoche").lng:"";
			this.form.originLat = uni.getStorageSync("start_baoche")?uni.getStorageSync("start_baoche").lat:"";
			this.form.destinationLng = uni.getStorageSync("end_baoche")?uni.getStorageSync("end_baoche").lng:"";
			this.form.destinationLat = uni.getStorageSync("end_baoche")?uni.getStorageSync("end_baoche").lat:"";
			try {
				let val = Cache.get('privacyStatus') || false;
				if (!val) {
					this.privacyStatus = true;
				}
			} catch (e) {}
		},
		onLoad(option) {
			this.minDate = (Number(new Date())+7200000)
			
			console.log("minDate", this.minDate)
			this.filterBaocheTime()
			this.getList()
			
		},
		onReady() {
		},
		methods:{
			// 同意隐私协议
			confirmApp() {
				Cache.set('privacyStatus', true,86400);
				this.privacyStatus = false;
			},
			// 关闭 Model
			closeModel() {
				this.privacyStatus = false;
				uni.navigateBack()
			},
			elPeopleSum(){
				this.seat = 0
				this.form.carType = ''
				this.carList = []
				
				this.carTypeList.forEach( el => {
					el.num = 0
				})
			},
			closeCarType(){
				if(!this.isSeatSucces){
					this.seat = 0
					console.log("this.seat",this.seat)
					this.form.carType = ''
					this.carList = []
					
					this.carTypeList.forEach( el => {
						el.num = 0
					})
				}
				// this.carTypeShow = false
				this.$refs.popup.close();
				
			},
			confirmCarType(){
				var str = ''
				this.carList = []
				var nums = 0;
				this.carTypeList.forEach(el => {
					if(el.num&&el.num != 0){
						str == '' ? (str = (el.name + 'X'+ el.num)) : (str = str + ';' + (el.name + 'X'+ el.num))
						this.carList.push({
							id: el.id,
							name: el.name,
							num: el.num,
							seat: el.seat,
						})
						nums = nums + el.seat * el.num
					}
				})
				this.seat = nums
				// console.log("this.seat",this.seat)
				
				this.form.carType = str
				if(this.seat >= this.form.peopleSum){
					this.isSeatSucces = true
					this.$refs.popup.close();
				} else {
					
					this.isSeatSucces = false
					return this.$util.Tips({
						title: '车载人数小于乘车人数，请增加车辆'
					}); 
				}
				
			},
			filterBaocheTime(){
				var d = new Date();
				var hour =  d.getHours()
				console.log("hour",hour)
				if(hour >= 20){
					//20 只能选择  明天早上10:00 以后的
					this.minDate = (new Date(new Date().toLocaleDateString()).getTime()+86400000 + 10*3600000)
					
				}
				// console.log("this.minDate",this.minDate)
			},

			filter(type, options) {
			
			
				if (type === 'minute') {
					return options.filter((option) => option % 10 === 0)
				}
				return options;
			},
			formatter(type, value) {
				if (type === 'year') {
					return `${value}年`
				}
				if (type === 'month') {
					return `${value}月`
				}
				if (type === 'day') {
					return `${value}日`
				}
				if (type === 'hour') {
					return `${value}时`
				}
				if (type === 'minute') {
					return `${value}分`
				}
				return value
			},
			formatter2(type, value) {
				if (type === 'year') {
					return `${value}年`
				}
				if (type === 'month') {
					return `${value}月`
				}
				if (type === 'day') {
					return `${value}日`
				}
				if (type === 'hour') {
					return `${value}时`
				}
				if (type === 'minute') {
					return `${value}分`
				}
				return value
			},
			goOpen() {
				this.$refs.gotimePicker.open();
			},
			backOpen() {
				this.$refs.backtimePicker.open();
			},
		
			
			goConfirm(e){
				// var d = new Date();
				// var strdate =  d.getFullYear() + '-' + e.value
				// const strStam = Date.parse(strdate);
				// const timestamp = Date.parse(new Date())/1000 +3600*3-60;
				
				// if(strStam/1000 < timestamp){
					
				// 	return this.$util.Tips({
				// 		title: '选择时间为当前时间三小时后'
				// 	}); 
				// }
				console.log("e",e)
				var time = new Date(e.value);
				console.log("time",time)
				var y = this.fmtNumber(time.getFullYear());
				var m = this.fmtNumber(time.getMonth()+1);
				var d = this.fmtNumber(time.getDate());
				var h = this.fmtNumber(time.getHours());
				var mm = this.fmtNumber(time.getMinutes());
				var s = this.fmtNumber(time.getSeconds());
				this.go_time_short = m + '月' + d + '日 ' +h + ':' + mm;
				this.form.goTime = y + '-' + m + '-' +d + ' ' + h + ':' + mm;
				console.log("go_time_short",this.go_time_short)				
				console.log("this.form.goTime",this.form.goTime)	
			},
			backConfirm(e){
				// var d = new Date();
				// var strdate =  d.getFullYear() + '-' + e.value
				// const strStam = Date.parse(strdate);
				// const timestamp = Date.parse(new Date())/1000 +3600*3-60;
				
				// if(strStam/1000 < timestamp){
					
				// 	return this.$util.Tips({
				// 		title: '选择时间为当前时间三小时后'
				// 	}); 
				// }
				var time = new Date(e.value);
				var y = this.fmtNumber(time.getFullYear());
				var m = this.fmtNumber(time.getMonth()+1);
				var d = this.fmtNumber(time.getDate());
				var h = this.fmtNumber(time.getHours());
				var mm = this.fmtNumber(time.getMinutes());
				var s = this.fmtNumber(time.getSeconds());
				this.back_time_short = m + '月' + d + '日 ' +h + ':' + mm;
				this.form.backTime = y + '-' + m + '-' +d + ' ' + h + ':' + mm;
								
					
			},
			showCarType(){
				if(!this.form.peopleSum){
					return this.$util.Tips({
						title: '请先填写用车人数'
					}); 
				}
				// this.carTypeShow= true;
				// console.log('carTypeShow',this.carTypeShow)
				
				this.$refs.popup.open();
			},
			
			goselAdd(type){
				uni.navigateTo({
					url: '/pages/bus/search_address/index?op=baoche&&type='+type
				})
				
			},
			gotoOrderList(){
				uni.navigateTo({
					url: "/pages/bus/baoche/order_list"
				})
			},
			gotoXuzhi(){
				uni.navigateTo({
					url: "/pages/web/web?url=https://bus.gybsky.cn/baochexuzhizunyi.html"
				})
			},
			contactUs: function contactUs() {
					openKf()
			},
			
			submitTrip(){
				var that =this
				if(!this.form.origin){
					return this.$util.Tips({
						title: '请选择出发地'
					}); 
				}
				if(!this.form.destination){
					return this.$util.Tips({
						title: '请选择目的地'
					}); 
				}
				if(!(this.form.originLng&&this.form.originLat)){
					return this.$util.Tips({
						title: '请选择出发地'
					}); 
				}
				if(!(this.form.destinationLng&&this.form.destinationLat)){
					return this.$util.Tips({
						title: '请选择目的地'
					}); 
				}
				if(!this.form.goTime){
					return this.$util.Tips({
						title: '请选择去程时间'
					}); 
				}
				if(!this.form.backTime&&this.current==1){
					return this.$util.Tips({
						title: '请选择返程时间'
					}); 
				}
				if(!this.form.carType){
					return this.$util.Tips({
						title: '请选择车辆类型'
					}); 
				}
				if(!this.form.peopleSum){
					return this.$util.Tips({
						title: '请输入用车人数'
					}); 
				}
				if(!this.form.name){
					return that.$util.Tips({
						title: '请输入联系人姓名'
					}); 
				}
				if(!this.form.phone){
					return this.$util.Tips({
						title: '请输入联系人手机号'
					}); 
				}
				const regex = /^1[3456789]\d{9}$/;//使用此正则即可
				if (!regex.test(this.form.phone)){
					return this.$util.Tips({
						title: '请输入联系人正确手机号'
					}); 
				}
	
				if(!this.form.days&&this.current==2){
					return this.$util.Tips({
						title: '请选择用车天数'
					}); 
				}
				this.form.type = this.current + 1;
				
				uni.showLoading({ title: '正在系统报价' });
				this.form.carStr = JSON.stringify(this.carList);
				saveBaoche(this.form).then(res => {
					this.$util.Tips({
						title: '报价成功'
					}); 
					uni.hideLoading()
					// uni.navigateTo({
					// 	url:"/pages/bus/baoche/order_list",
					// })
					uni.navigateTo({
						url:"/pages/bus/baoche/order_detail?baoche_id="+res.data.baocheId,
					})
				}).catch(err => {
					uni.hideLoading()
					console.log(err)
					return this.$util.Tips({
						title: err
					}); 
				})
			},
			
			valchange(e){
				// console.log('e',e)
				if(!this.form.peopleSum){
					return this.$util.Tips({
						title: '请先填写用车人数'
					}); 
				}
		
				this.carTypeList[e.params].num = e.value
			
				
				
			},
			getList(){
				var that = this
				getBaocheList().then(res => {
					that.carTypeList = []
					res.data.forEach( el => {
						that.carTypeList.push(
						{
							id: el.id,
							name: el.name,
							seat: el.seat,
							num: 0
						})
					})
				}).catch(err => {
					// this.$u.toast(err.msg)
				})
			},
			confirmDays(e){
				console.log('picker发送选择改变，携带值为', e.detail.value)
				
			    var day = this.daysList[e.detail.value]
				this.form.days =day.value
				this.days_short = day.label

			},
			goConfirm2(e){
				var d = new Date();
				var strdate =  d.getFullYear() + '-' + e.value
				const strStam = Date.parse(strdate);
				const timestamp = Date.parse(new Date())/1000 +3600*3-60;
				
				if(strStam/1000 < timestamp){
					
					return this.$util.Tips({
						title: '选择时间为当前时间三小时后'
					}); 
				}
				var time = new Date(Date.parse(strdate));
				var y = this.fmtNumber(time.getFullYear());
				var m = this.fmtNumber(time.getMonth()+1);
				var d = this.fmtNumber(time.getDate());
				var h = this.fmtNumber(time.getHours());
				var mm = this.fmtNumber(time.getMinutes());
				var s = this.fmtNumber(time.getSeconds());
				this.go_time_short = m + '月' + d + '日 ' +h + ':' + mm;
				this.form.goTime = y + '-' + m + '-' +d + ' ' + h + ':' + mm;
								
		
			},
			fmtNumber(n) {
				// return n.toString().padStart(2,"0")
				return n > 9 ? n + "" : "0" + n
			},
			backConfirm2(e){
			
			
				var d = new Date();
				var strdate =  d.getFullYear() + '-' + e.value
				var time = new Date(strdate);
				var y = this.fmtNumber(time.getFullYear());
				var m = this.fmtNumber(time.getMonth()+1);
				var d = this.fmtNumber(time.getDate());
				var h = this.fmtNumber(time.getHours());
				var mm = this.fmtNumber(time.getMinutes());
				var s = this.fmtNumber(time.getSeconds());
				this.back_time_short = m + '月' + d + '日 ' +h + ':' + mm;
				this.form.backTime = y + '-' + m + '-' +d + ' ' + h + ':' + mm;
				
						
			},
			change(index) {
				this.current = index;
			},
			
		},
		
		
	}
</script>

<style lang="scss" scoped>
	.wrap{
	    padding-bottom: 72px;
		padding: 20rpx 24rpx;
		color: #1b1b1b;
	}
	.icon-44 {
	    width: 44rpx;
	    height: 44rpx;
	}
	.bb-title{
		margin-right: 14px;
	    width: auto;
		color: #1b1b1b;
		font-size: 15px;
			
	}
	
	.bb-line {
		flex: 1;
		border-bottom: 0.5px solid #E4E4E4;
		padding: 10px 0;
	}
	.content {
	    padding: 24rpx;
	    text-align: center;
	}
	
	.sub-btn {
		// position: fixed;
		// width: 100%;
		// bottom: 10px;
		height: 90rpx;
		line-height: 90rpx;
		// @include main_bg_color(theme);
		background-color: #007AFF;
		color: #fff;
		font-size: 32rpx;
		text-align: center;
		border-radius: 45rpx;
		z-index: 999999;
	}
	.queren{
		position: fixed;
		bottom: 10px;
		width: 100%;
		display: flex;
		justify-content: center;
	}
	.privacy-wrapper {
		z-index: 999;
		position: fixed;
		left: 0;
		top: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;
		background: #7f7f7f;
		.privacy-box {
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%);
			width: 560rpx;
			padding: 50rpx 45rpx 0;
			background: #fff;
			border-radius: 20rpx;
			.title {
				text-align: center;
				font-size: 32rpx;
				text-align: center;
				color: #333;
				font-weight: 700;
			}
			.content {
				margin-top: 20rpx;
				line-height: 1.5;
				font-size: 26rpx;
				color: #666;
				view {
					display: inline-block;
					color: #007AFF;
				}
			}
			.btn-box {
				margin-top: 40rpx;
				text-align: center;
				font-size: 30rpx;
				.btn-item {
					height: 82rpx;
					line-height: 82rpx;
					background: linear-gradient(90deg, #38a4f6 0%, #007AFF 100%);
					color: #fff;
					border-radius: 41rpx;
				}
				.btn {
					padding: 30rpx 0;
				}
			}
		}
	}
	
</style>